#include <stdio.h>
#include <string.h>
#include <assert.h>


char * my_strncpy(char* dest,const char * source,size_t count)
{
	char* start = dest;
	while (count && (*dest++ = *source++))
		count--;
	if (count)
	{
		while (--count)
			*dest++ = '\0';
	}
		
	return (start);
}
//int main()
//{
//	char arr1[5] = "abc";
//	char arr2[] = "hello bit";
//	my_strncpy(arr1,arr2,4);
//
//	printf("%s\n", arr1);
//	return 0;
//}